projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e2f5b72
)
Add new inline function `hash-table-empty-p'
author
Bozhidar Batsov
<bozhidar@batsov.com>
Wed, 20 May 2015 15:49:20 +0000
(18:49 +0300)
committer
Bozhidar Batsov
<bozhidar@batsov.com>
Wed, 20 May 2015 15:49:20 +0000
(18:49 +0300)
lisp/emacs-lisp/subr-x.el
patch
|
blob
|
history
diff --git
a/lisp/emacs-lisp/subr-x.el
b/lisp/emacs-lisp/subr-x.el
index bd178faa4affb80922ff55a10fe84e9633b5ba4d..dc5b7e9824cb14b3381a7e104e08dd94dbc8582a 100644
(file)
--- a/
lisp/emacs-lisp/subr-x.el
+++ b/
lisp/emacs-lisp/subr-x.el
@@
-140,6
+140,10
@@
to bind a single value, BINDINGS can just be a plain tuple."
(declare (indent 1) (debug if-let))
(list 'if-let bindings (macroexp-progn body)))
+(defsubst hash-table-empty-p (table)
+ "Check whether TABLE is empty (has 0 elements)."
+ (zerop (hash-table-count table)))
+
(defsubst hash-table-keys (hash-table)
"Return a list of keys in HASH-TABLE."
(let ((keys '()))